Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

open

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

open

Open stuff like URLs, files, executables. Cross-platform.

  • 8.4.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
42M
increased by7.71%
Maintainers
1
Weekly downloads
 
Created

What is open?

The 'open' npm package is a simple utility to open a file, URL, or executable in the default program associated with that file type on the user's operating system. It can be used to open resources in the default browser, editor, or any other program.

What are open's main functionalities?

Open URLs in the default web browser

This feature allows you to open a URL in the user's default web browser.

const open = require('open');
open('https://www.example.com');

Open files in the default application

This feature allows you to open a file in the default application associated with its file type, such as a PDF in a PDF viewer.

const open = require('open');
open('path/to/file.pdf');

Open files with a specific application

This feature allows you to open a file with a specific application, bypassing the default application.

const open = require('open');
open('path/to/file.txt', {app: {name: 'notepad'}});

Open files with application and arguments

This feature allows you to open a file with a specific application and pass command-line arguments to the application.

const open = require('open');
open('path/to/file', {app: {name: 'app-name', arguments: ['--arg1', '--arg2']}});

Other packages similar to open

Keywords

FAQs

Package last updated on 20 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc